-- GENERATED SPELL FOR [Thexal Deathchill] --


function spell0_31775(pUnit, Event) --@Chill Nova,Self--
pUnit:FullCastSpellOnTarget(18099,pUnit)
pUnit:RegisterEvent('Sorts_31775', 10303, 1)
end

function spell1_31775(pUnit, Event) --@Deathchill Empowerment,n/a--
pUnit:FullCastSpellOnTarget(59663,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_31775', 1500, 1)
end

function spell2_31775(pUnit, Event) --@Fear,n/a--
pUnit:FullCastSpellOnTarget(12096,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_31775', 9500, 1)
end

function spell3_31775(pUnit, Event) --@Frost Armor,Self--
pUnit:FullCastSpellOnTarget(18100,pUnit)
pUnit:RegisterEvent('Sorts_31775', 0, 1)
end

function spell4_31775(pUnit, Event) --@Frostbolt,n/a--
pUnit:FullCastSpellOnTarget(61747,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_31775', 6000, 1)
end

function spell5_31775(pUnit, Event) --@Lich Slap,n/a--
pUnit:FullCastSpellOnTarget(60924,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_31775', 553, 1)
end

function Sorts_31775(pUnit, Event)
local choix_sorts_31775 = math.random(0, 5)
if choix_sorts_31775 == 0 then
pUnit:RegisterEvent('spell0_31775', 1, 1)
end
if choix_sorts_31775 == 1 then
pUnit:RegisterEvent('spell1_31775', 1, 1)
end
if choix_sorts_31775 == 2 then
pUnit:RegisterEvent('spell2_31775', 1, 1)
end
if choix_sorts_31775 == 3 then
pUnit:RegisterEvent('spell3_31775', 1, 1)
end
if choix_sorts_31775 == 4 then
pUnit:RegisterEvent('spell4_31775', 1, 1)
end
if choix_sorts_31775 == 5 then
pUnit:RegisterEvent('spell5_31775', 1, 1)
end
end

function mob31775_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_31775', math.random(1500, 3000), 1)
end

function mob31775_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob31775_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob31775_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(31775, 1, 'mob31775_Action')
RegisterUnitEvent(31775, 2, 'mob31775_Leave')
RegisterUnitEvent(31775, 3, 'mob31775_Kill')
RegisterUnitEvent(31775, 4, 'mob31775_Die')
